﻿<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
	xmlns:myBoard_App="clr-namespace:myBoard.App" xmlns:myBoard_Framework_Controls="clr-namespace:myBoard.Framework.Controls;assembly=myBoard.Framework"
	x:Class="myBoard.App.Components.MainWindow"
	x:Name="Window"
	Title=""
	Width="900" WindowStyle="None" ResizeMode="NoResize" ShowInTaskbar="False" BorderThickness="0,0,0,0" Background="{x:Null}" AllowsTransparency="True" Height="712">
	<Window.Resources>
		<ControlTemplate x:Key="WindowTemplateKey" TargetType="{x:Type Window}">
			<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
				<Grid>
					<AdornerDecorator>
						<ContentPresenter/>
					</AdornerDecorator>
					<ResizeGrip Visibility="Collapsed" IsTabStop="false" HorizontalAlignment="Right" x:Name="WindowResizeGrip" VerticalAlignment="Bottom"/>
				</Grid>
			</Border>
			<ControlTemplate.Triggers>
				<MultiTrigger>
					<MultiTrigger.Conditions>
						<Condition Property="ResizeMode" Value="CanResizeWithGrip"/>
						<Condition Property="WindowState" Value="Normal"/>
					</MultiTrigger.Conditions>
					<Setter Property="Visibility" TargetName="WindowResizeGrip" Value="Visible"/>
				</MultiTrigger>
			</ControlTemplate.Triggers>
		</ControlTemplate>
		<Style x:Key="WindowStyle1" TargetType="{x:Type Window}">
			<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
			<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type Window}">
						<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Height="Auto">
							<AdornerDecorator>
								<ContentPresenter/>
							</AdornerDecorator>
						</Border>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
			<Style.Triggers>
				<Trigger Property="ResizeMode" Value="CanResizeWithGrip">
					<Setter Property="Template" Value="{StaticResource WindowTemplateKey}"/>
				</Trigger>
			</Style.Triggers>
		</Style>
		<Storyboard x:Key="ShowLoader">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_pleaseWaitContainer" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="0" KeySpline="0,1,1,1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_pleaseWaitContainer" Storyboard.TargetProperty="(UIElement.Opacity)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="1" KeySpline="0,1,1,1"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="HideLoader">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_pleaseWaitContainer" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="-50" KeySpline="1,0,1,1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_pleaseWaitContainer" Storyboard.TargetProperty="(UIElement.Opacity)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="0" KeySpline="1,0,1,1"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</Window.Resources>
	<Window.Triggers>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded">
			<BeginStoryboard Storyboard="{StaticResource ShowLoader}"/>
		</EventTrigger>
	</Window.Triggers>

	<Border Background="#33000000" CornerRadius="8,8,8,8">
		<StackPanel Margin="0,7" Height="Auto">
			<Border Width="Auto" x:Name="_topMenuZone" Margin="7,0" BorderBrush="White" BorderThickness="2,2,2,0" CornerRadius="7,7,0,0" Height="114">
				<Border.Background>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#FF90DCF4" Offset="0"/>
						<GradientStop Color="#FF41C2EC" Offset="0.953"/>
						<GradientStop Color="#FF07B2E6" Offset="0.763"/>
						<GradientStop Color="#FF099DCB" Offset="0.996"/>
					</LinearGradientBrush>
				</Border.Background>
				<Grid>
					<StackPanel Orientation="Vertical" d:LayoutOverrides="Width, Height" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="40,26,0,0">
						<Grid VerticalAlignment="Top">
							<TextBlock Text="Store" TextWrapping="Wrap" VerticalAlignment="Top" Margin="0" FontFamily="Aharoni" FontSize="56" Foreground="#FF053B4C" d:LayoutOverrides="Width">
								<TextBlock.Effect>
									<DropShadowEffect BlurRadius="3" Opacity="0.57" ShadowDepth="1"/>
								</TextBlock.Effect>
							</TextBlock>
							<TextBlock Text="Store" TextWrapping="Wrap" VerticalAlignment="Top" Margin="0" FontFamily="Aharoni" FontSize="56" Foreground="#FF0C6581" d:LayoutOverrides="Width">
								<TextBlock.OpacityMask>
									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
										<GradientStop Color="Black" Offset="0.6"/>
										<GradientStop Offset="0.6"/>
									</LinearGradientBrush>
								</TextBlock.OpacityMask>
							</TextBlock>
						</Grid>
						<TextBlock HorizontalAlignment="Right" Margin="0,-7,-17,0" VerticalAlignment="Top" FontFamily="Aharoni" FontSize="10.667" Foreground="#FF053B4C" Text="Get the magnet you need" TextWrapping="Wrap"/>
					</StackPanel>
				</Grid>
			</Border>
			<Grid Height="565">
				<Border BorderBrush="{x:Null}" RenderTransformOrigin="0.5,0.5" x:Name="_contentZone" BorderThickness="7,0,7,7" CornerRadius="0,0,7,7" Panel.ZIndex="2" Background="White">
					<Border.RenderTransform>
						<TransformGroup>
							<ScaleTransform ScaleX="1" ScaleY="1"/>
							<SkewTransform AngleX="0" AngleY="0"/>
							<RotateTransform Angle="0"/>
							<TranslateTransform X="0"/>
						</TransformGroup>
					</Border.RenderTransform>
					<!--<myBoard_App:MainScreen VerticalAlignment="Top" Margin="0,-28,0,0" Height="570"/>-->
					<myBoard_App:AuthenticationControl x:Name="_authentificationControl" HorizontalAlignment="Center" VerticalAlignment="Center" d:IsHidden="True"/>
				</Border>
				<Border x:Name="_pleaseWaitContainer" HorizontalAlignment="Center" VerticalAlignment="Center" Panel.ZIndex="3" BorderThickness="1" CornerRadius="0,10,0,10" RenderTransformOrigin="0.5,0.5" Opacity="0">
					<Border.RenderTransform>
						<TransformGroup>
							<ScaleTransform/>
							<SkewTransform/>
							<RotateTransform/>
							<TranslateTransform Y="50"/>
						</TransformGroup>
					</Border.RenderTransform>
					<Border.BorderBrush>
						<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
							<GradientStop Color="#FF0C6581" Offset="0"/>
							<GradientStop Color="#FF053B4C" Offset="1"/>
						</LinearGradientBrush>
					</Border.BorderBrush>
					<StackPanel Margin="20">
						<TextBlock x:Name="_pleaseWaitText" HorizontalAlignment="Center" FontFamily="Candara" FontSize="13.333" Foreground="#FF053B4C" Text="Connecting, please wait ..." TextWrapping="Wrap"/>
						<myBoard_Framework_Controls:PreLoader RingBackground="#CC053B4C" x:Name="_preLoader" Margin="0,15,0,0" d:LayoutOverrides="Height">
						</myBoard_Framework_Controls:PreLoader>						
					</StackPanel>
				</Border>
			</Grid>
			<Border x:Name="_bottomMenuZone" Background="{x:Null}" CornerRadius="10,10,10,10" Margin="0" Height="22" d:IsHidden="True">
				<Grid Margin="12,0">
					<Label x:Name="_statusLbl" HorizontalAlignment="Left" VerticalAlignment="Center" Content="" Foreground="#FFFFFFFF" Padding="5,0,5,0"/>
					<Button x:Name="_closeBt" HorizontalAlignment="Right" Content="[ close ]" d:LayoutOverrides="Height" Style="{DynamicResource TransparentButtonStyle}" Foreground="White" Cursor="Hand"/>
				</Grid>
			</Border>
		</StackPanel>
	</Border>
</Window>